home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / scheme / pcscheme / geneva / sources.exe / SOURCES / S / PATCH.S < prev    next >
Encoding:
Text File  |  1993-11-18  |  2.4 KB  |  54 lines

  1. ;* PATCH.S (PATCH.PCS)
  2. ;************************************************************************
  3. ;*                                                                      *
  4. ;*              PC Scheme/Geneva 4.00 Scheme Startup code               *
  5. ;*                                                                      *
  6. ;* (c) 1985-1988 by Texas Instruments, Inc. See COPYRIGHT.TXT           *
  7. ;* (c) 1992 by L. Bartholdi & M. Vuilleumier, University of Geneva      *
  8. ;*                                                                      *
  9. ;*----------------------------------------------------------------------*
  10. ;*                                                                      *
  11. ;*      First file loaded after bootstrap, for local system patch    *
  12. ;*                                                                      *
  13. ;*----------------------------------------------------------------------*
  14. ;*                                                                      *
  15. ;* Created by: M. Vuilleumier           Date: 1993                      *
  16. ;* Revision history:                                                    *
  17. ;* - 18 Jun 92: Renaissance (Borland Compilers, ...)                    *
  18. ;* -  6 Nov 93: Patch init-graph so that it is invoked only once (mv)   *
  19. ;*                                                                      *
  20. ;*                                      ``In nomine omnipotentii dei''  *
  21. ;************************************************************************
  22. ;*
  23.  
  24. ; PATCH #1 : pcs-machine-type  --- cpu identification crashes on some systems
  25.  
  26.     ; pcs-machine-type is (list (cons CPU SPEED) NDP ROM-ID)
  27.     ; Switch the comments if your machine is not compatible.
  28. (set! pcs-machine-type (%esc 41))
  29. ; (set! pcs-machine-type '((8086 . 5) 0 0))
  30.  
  31.  
  32. ; PATCH #2 : init-graph  --- we don't want to allocate memory twice for BGI
  33.  
  34. (define-integrable init-graph)
  35. (define-integrable close-graph)
  36.  
  37. (let* ((active #f))
  38.   (set! (access %init-graph user-global-environment)
  39.     (named-lambda (%init-graph . args)
  40.       (if active
  41.       (set-graph-mode (or (car args) (get-graph-mode)))
  42.       (apply init-graph args))
  43.       (set! active #t)))
  44.  
  45.   (set! (access %close-graph user-global-environment)
  46.     (named-lambda (%close-graph)
  47.       (when active
  48.     (close-graph)
  49.     (set! active #f)))
  50.   ))
  51.  
  52. (define-integrable init-graph %init-graph)
  53. (define-integrable close-graph %close-graph)
  54.